package org.yellow.backend.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yellow.backend.mapper.patientMapper;
import org.yellow.backend.pojo.patient;

/**
 * @author: hy
 * @create: 2024-01-01
 */
@Service
public class patientService {
    @Autowired
    patientMapper mapper;

    /**
     * 根据id查询病人信息
     * @param id
     * @return
     */
    public patient selectPatientById(long id){
        return mapper.selectById(id);
    }

    /**
     * 插入病人信息
     * @param patient
     * @return
     */
    public boolean insertPatient( patient patient){
        mapper.insert(patient);
        return true;
    }
}
